<cfif not isdefined("session.tablocation")>
	<cfset session.tablocation = "../">
</cfif>
<CFPARAM NAME="client.loggedin" DEFAULT="false" TYPE="boolean">

<CFIF IsDefined("url.autolog") AND url.autolog IS "yes">
	<CFIF IsDefined("client.userid") AND client.userid IS url.userid>
		<CFIF IsDefined("client.companycode") AND client.companycode IS url.companyid>
			<CFSET lAutolog=false>
		<CFELSE>
			<CFSET lAutolog=true>
		</CFIF>
	<CFELSE>
		<CFSET lAutolog=true>
	</CFIF>
<CFELSE>
	<CFSET lAutolog=false>
</CFIF>
<CFCOOKIE NAME="CFID" VALUE="#client.CFID#">
<CFCOOKIE NAME="CFTOKEN" VALUE="#client.CFTOKEN#">

<CFIF lAutolog OR
	  (	IsDefined("url.autolog") AND url.autolog IS "yes" AND
	   (NOT IsDefined("session.site_maincfm") OR NOT client.loggedin)
	  )>

	<CFIF IsDefined("url.mapi")>
		<CFSET url.id=URLDecode(url.id)>
		<CFSET sENCRYPTEDSTRING="">
		<CFSET nTo=Len(url.id)>

		<CFLOOP FROM=1 TO=#nTo# INDEX="x">
			<CFSET sChar=Mid(url.id, x, 1)>
			<CFSET nAsc=Asc(sChar) - x>
			<CFSET sENCRYPTEDSTRING=sENCRYPTEDSTRING & Chr(nAsc)>
		</CFLOOP>

		<CFSET sId=Reverse(sENCRYPTEDSTRING)>
	<CFELSE>
		<CFSET sId=url.id>
	</CFIF>

	<CFLOCATION URL="autolog.cfm?autolog=no&userid=#url.userid#&companyid=#url.companyid#&id=#URLEncodedFormat(Trim(sId))#&collab=#URLEncodedFormat(url.collab)#" addtoken="Yes">
</CFIF>

<CFIF NOT IsDefined("url.autolog")>
	<CFIF NOT(client.loggedin) OR isDefined("url.logout")>
		<CFINCLUDE TEMPLATE="#client.common_path#access/logout.cfm">
	</CFIF>
</CFIF>
<CFPARAM NAME="session.tabId" DEFAULT="collab">

<CFSETTING ENABLECFOUTPUTONLY="Yes">
<CFSET sUpdateMsg="">

<CFIF NOT IsDefined("url.mapi")>
	<CFSET url.id=decrypt(url.id, client.ek)>
<CFELSE>
	<CFSET sUpdateMsg=url.sendmess>
</CFIF>

<!DOCTYPE HTML> 
<html>
<CFSETTING ENABLECFOUTPUTONLY="No">
<CFINCLUDE TEMPLATE="#client.common_path#_toggle.cfm">



<head>
	<title>iBOS/e eForums</title>
	<meta charset="utf-8">
	<meta name="keywords" content="jQuery DropDownList, List, ListBox, Popup List, jqxDropDownList, jqxListBox, List Widget, ListBox Widget, DropDownList Widget" /> 
    <meta name="description" content="The jqxListBox in this demo is populated with items and show how to display image next to each item."/>

	
</head>

<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#ffffff">
	    <CFMODULE TEMPLATE="#client.common_path#cfm_workspace.cfm" MODULE="utilities" LOCATION="../../ecollab/" COMPONENT="eForums">
		<CFOUTPUT><LINK REL="StyleSheet" HREF="#client.wstheme_path##client.empcolor#.css" TYPE="text/css">
		</CFOUTPUT>
		<link rel="stylesheet" href="../../scripts/jqwidgets/jqwidgets/styles/jqx.base.css" type="text/css" />    
		<link rel="stylesheet" href="../../scripts/jqwidgets/jqwidgets/styles/custom_filinvest.css" type="text/css" />
	    <script type="text/javascript" src="../../scripts/autoresize.js"></script>
	    <script type="text/javascript" src="jdump.js"></script>   
		<script type="text/javascript" src="../../scripts/jqwidgets/scripts/gettheme.js"></script>

        <script type="text/javascript" src="../../scripts/jqwidgets/jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../scripts/jqwidgets/jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../scripts/jqwidgets/jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../scripts/jqwidgets/jqwidgets/jqxlistbox.js"></script>  
         
			
			<div id='jqxWidget' style="float: left;">  
			</div>
			
			<p>
				
				<div style="height: 30px; width: 30px; float: left;"><li id="backbuttonxyzback" style="list-style: none; display: none;" onclick="backandclean()" class="ui-state-default ui-corner-all" title="Return"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li></div>
			</p>
			
			
			<div id="containerforwords" style="background-color: #FFF; display: block; float: left; width: 600px; height: auto; border-left: solid 1px #CCC; border-top: solid 1px #CCC;">
				<div id="loadingpleasewait" style="height: auto; width: auto; float: left; background-color: #FFF; font-size: .9em"></div>
				<table border="0" bordercolor="#FFF" id="maintabletableid" style="width: 50px; height: auto;">
			    </table>
			</div>
			
			
			
			
			<div id="listcontainerabc" style="background-color: #FFF; float: left; width: auto; height: auto; ">
			
			
			    <cfquery name="getCollabcodeForMe" datasource="#client.company_dsn#" >
			        SELECT COUNT, COLLABCODE, RIGHTSID, DATECREATED
			          FROM ECRTCOLLAB
			         WHERE USERID = '#client.USERID#' 
			                 AND ISALLOWED IS NOT NULL
			      ORDER BY DATECREATED DESC;
			    </cfquery>
			    <span style="display: none;">~trimstartshere2~</span>
			    
				
			    
			    <cfset getSubjectFirst.COLLABCODE = '' />
			 
			    
			    <cfloop query="getCollabcodeForMe" startrow="1" endrow="1">
			    
			        <cfquery name="getSubjectFirst" datasource="#client.company_dsn#" maxrows="1">
			            SELECT COLLABCODE, SUBJECT, ISPUBLIC
			              FROM ECRGCOLLABTHREAD
			             WHERE COLLABCODE = '#getCollabcodeForMe.COLLABCODE#'
			             <cfif Ucase(client.DBMS) EQ 'MYSQL'>
			             LIMIT 1;
						 <cfelseif Ucase(client.DBMS) EQ 'MSSQL'>
							 ;
						 </cfif>
			        </cfquery>
			   
			    </cfloop>
			    
			    <span style="display: none;">~trimendshere2~</span>
			
			</div>
			
			
			
				   <script type="text/javascript">
			            $(document).ready(function () {
			                var theme = getDemoTheme();
			                var source = [
							
							    <cfloop query="getCollabcodeForMe">
			    
									<cfquery name="getSubject" datasource="#client.company_dsn#" >
										SELECT COLLABCODE, SUBJECT, ISPUBLIC
										  FROM ECRGCOLLABTHREAD
										 WHERE COLLABCODE = '#getCollabcodeForMe.COLLABCODE#'  
										  ;
									</cfquery>
									
									
									<cfloop query="getSubject">  
										{ html: "<cfoutput><li class='thetopiclists' style='list-style: none;' title='#getSubject.SUBJECT# (#getCollabcodeForMe.COUNT#' onclick=\"listclick('#getSubject.COLLABCODE#', '0')\"><span style='font-size: .9em; font-family: Arial, Helvetica, sans-serif;' class='listtopicclass'  >#getSubject.SUBJECT# (#getCollabcodeForMe.COUNT#)</span></li></cfoutput>" },
									</cfloop>
								  
								</cfloop>
								{ html: "&nbsp;"}
							    
					        ];
			                // Create a jqxListBox
			                $("#jqxWidget").jqxListBox({ selectedIndex: 0, source: source, width: 200, height: 250, theme: theme });
							
							<cfoutput>listclick('#getSubjectFirst.COLLABCODE#', '0');</cfoutput>
							
			            });
						
					
			        </script>
	 	
	<CFMODULE TEMPLATE="#client.common_path#cfm_workspace.cfm" TOP="False">

	<CFIF IsDefined("url.expire") AND url.expire IS NOT "">
		<script>
			<CFOUTPUT>
			alert("Your password will expire on #DateFormat(url.expire, 'mmmm dd, yyyy')#\nYou have #DateDiff('d', Now(), url.expire)# day(s) left before your password expires\nPlease change your password immediately")
			</CFOUTPUT>
		</script>
	</CFIF>
</html>